package com.yikaiye.android.yikaiye.ui.activity.home;

import android.text.Html;
import android.text.TextUtils;

import com.yikaiye.android.yikaiye.base.BaseActivity;
import com.yikaiye.android.yikaiye.base.BaseViewModel;
import com.yikaiye.android.yikaiye.config.Constant;
import com.yikaiye.android.yikaiye.databinding.ActivityServiceIntroduceBinding;

/**
 * 服务介绍
 */
public class ServiceIntroduceActivity extends BaseActivity<ActivityServiceIntroduceBinding, BaseViewModel> {

    @Override
    protected BaseViewModel bindModel() {
        return getViewModel(this, BaseViewModel.class);
    }

    @Override
    protected void initInject() {
        getActivityComponent().inject(this);
    }

    @Override
    public void initData() {
        if (null != getIntent().getExtras()) {
            String title = getIntent().getExtras().getString(Constant.NAME_KEY);
            initTitleBar(title);
        } else {
            initTitleBar();
        }
        if (!TextUtils.isEmpty(Constant.serviceInstruction)) {
            binding.tvIntroduce.setText(Html.fromHtml(Constant.serviceInstruction, null, null));
        }
    }
}